import http from "@/http/index.ts"
import {MaterialCategory,MaterialCategoryListParam} from '@/api/materialCategory/type.ts'


// 新增分类
export const addApi = (data: MaterialCategory) => {
    return http.post("/materialCategory/createCategory", data)
}


// 分页条件查询列表
export const getListApi = (data:MaterialCategoryListParam) => {
    return http.get("/materialCategory/getMaterialCategoryList",data)
}

// 精简列表
export const getSimpleListApi = () => {
    return http.get("/materialCategory/simpleList")
}

// 编辑
export const editApi = (data: MaterialCategory) => {
    return http.put("/materialCategory/updateCategory", data)
}


// 删除
export const deleteApi = (id: number) => {
    return http.delete(`/materialCategory/deleteCategory/${id}`)
}

